package com.cyzy;


import com.cyzy.controller.UserController;
import com.cyzy.dto.ResponseDto;
import com.cyzy.pojo.Passenger;
import com.cyzy.utils.JwtUtil;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;
import java.util.Map;

@SpringBootTest
public class test {

    @Autowired
    private UserController userController;

    @Test
    public void register(Passenger passenger){



        ResponseDto register = userController.register(passenger);
        System.out.println(register);

    }
    @Test
    public void Test(){
        Map<String,Object> map=new HashMap<>();
        map.put("id",1);
        map.put("acc","user01");
        String s = JwtUtil.genToken(map);
        System.out.println(s);
    }
}
